© TIB Inc. — Technical document — API – Portal — Mar 13th, 2022 22
The client needs to generate 1024 bits RSA key.
The RSA public key needs to be XML formatted to be transmitted to the server.
Keep the “private” portion of the key for step #7.
Client-Side Public key
<RSAKeyValue><Modulus>x/zU3Pv4ji9jzelcHeAb77y5h3jaqjIcdBHk0BCKaQhRswdJvMUP9wEtkutnAjOSjGg
gR75L7t+4J5+Z78Rdy0SP/N/bMVpzR3MlCiKfxlADN9LhU/b8269YLpJm7nbbDkqMu7e3A6ms09f//FoROLJ
sY9LrTnQMC64gzP+GORU=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>
The XML need to be converted into a list of bytes based on UTF8 encoding.
Client-Side public key byte array
60,82,83,65,75,101,121,86,97,108,117,101,62,60,77,111,100,117,108,117,115,62,120,47,122,85,51,80,118,52,
106,105,57,106,122,101,108,99,72,101,65,98,55,55,121,53,104,51,106,97,113,106,73,99,100,66,72,107,48,66,
67,75,97,81,104,82,115,119,100,74,118,77,85,80,57,119,69,116,107,117,116,110,65,106,79,83,106,71,103,10
3,82,55,53,76,55,116,43,52,74,53,43,90,55,56,82,100,121,48,83,80,47,78,47,98,77,86,112,122,82,51,77,108,67,
105,75,102,120,108,65,68,78,57,76,104,85,47,98,56,50,54,57,89,76,112,74,109,55,110,98,98,68,107,113,77,11
7,55,101,51,65,54,109,115,48,57,102,47,47,70,111,82,79,76,74,115,89,57,76,114,84,110,81,77,67,54,52,103,1
22,80,43,71,79,82,85,61,60,47,77,111,100,117,108,117,115,62,60,69,120,112,111,110,101,110,116,62,65,81,6
5,66,60,47,69,120,112,111,110,101,110,116,62,60,47,82,83,65,75,101,121,86,97,108,117,101,62
Step 4: Combines client-side symmetric key and asymmetric key.
The symmetric key of step 2 and the public key of step 3 needs to get combined. That way, everything
will be encrypted once.
Combine order
[Symmetric][Asymmetric]
191,204,10,109,135,63,93,79,140,0,249,103,250,188,212,210,60,82,83,65,75,101,121,86,97,108,117,101,62,6
0,77,111,100,117,108,117,115,62,120,47,122,85,51,80,118,52,106,105,57,106,122,101,108,99,72,101,65,98,5
5,55,121,53,104,51,106,97,113,106,73,99,100,66,72,107,48,66,67,75,97,81,104,82,115,119,100,74,118,77,85,8
0,57,119,69,116,107,117,116,110,65,106,79,83,106,71,103,103,82,55,53,76,55,116,43,52,74,53,43,90,55,56,82
,100,121,48,83,80,47,78,47,98,77,86,112,122,82,51,77,108,67,105,75,102,120,108,65,68,78,57,76,104,85,47,9
8,56,50,54,57,89,76,112,74,109,55,110,98,98,68,107,113,77,117,55,101,51,65,54,109,115,48,57,102,47,47,70,
111,82,79,76,74,115,89,57,76,114,84,110,81,77,67,54,52,103,122,80,43,71,79,82,85,61,60,47,77,111,100,117,
108,117,115,62,60,69,120,112,111,110,101,110,116,62,65,81,65,66,60,47,69,120,112,111,110,101,110,116,62
,60,47,82,83,65,75,101,121,86,97,108,117,101,62
Step 5: Encrypt the combined keys.
The combined key of the step #4 needs to get encrypted with the server-side public key received at step
#1. So, the RSA key needs to be used by an RSA algorithm to transform the byte array into a crypted byte
array.